package com.clement.spring.study.config;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.stereotype.Component;

/**
 * Created by Clement on 2017/2/28.
 */
@ImportResource("classpath:META-INF/spring/event-listener.xml")
@Configuration
public class ListenerConfig {

    //@Bean
    public ApplicationEventPublisher applicationEventPublisher() {
        return new ApplicationEventPublisher() {
            @Override
            public void publishEvent(ApplicationEvent event) {

            }

            @Override
            public void publishEvent(Object event) {

            }
        };
    }
}
